package com.lnsoft.dqfs.client.test;

//	终端报文帧处理工具类
public class ClientFrameUtils {
    // 生成数据包cs验证码
    public static int createCS(byte[] bytes, int startIndex, int endIndex) {
        int cs = 0;
        for (int i = startIndex; i < endIndex; i++) {
            cs += (bytes[i] & 0xFF);
        }
        return cs & 255; // cs % 256
    }
}
